
#ifndef  TOPIC_H
#define  TOPIC_H


//TODO:  class Directory =>  mkdir, rmdir, dirExist, mkdir -p
#include "recovery/Status.h"

//Meta data collection
class Topic {
public:
    Topic(const std::string & name, const std::string & root);
    bool isOpened() const{ return _opened; }
    int open() ;
    int close();

    const std::string & root() const{ return _root; }
    const std::string & directory() const { return _directory; }
    const std::string & logPath() const{ return _logPath; }

private:
	recovery::Status createIfNotExist(const std::string & dir);
private:
    std::string _root;
    std::string _directory;
    std::string _logPath;
    bool _opened = false;
};


#endif   /* TOPIC_H */
